<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>商品详情查询</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="../../../elementUI/index.css">
  <link rel="stylesheet" href="../../../css/index.css">
</head>

<body>
  <div id="app" class="minWidth">
    <el-form :model="form" :rules="rules" ref="contract" inline-message="true" style="width: 100%">
      <div class="table_titel">
        <div class="titel">商品详情</div>
      </div>
      <el-descriptions :column="3" border size="small">
        <el-descriptions-item label="商品名称">
          <el-form-item prop="Article_Name">
            <el-input v-model.trim="form.Article_Name" :disabled="true" placeholder="暂无商品名称"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="品牌">
          <el-form-item prop="Brand_SerialNumber">
            <el-select v-model.trim="form.Brand_SerialNumber" :disabled="true" placeholder="请选择商品品牌" filterable
              style="width: 100%">
              <el-option v-for="(item,index) in brand" :key="index" :label="item" :value="item"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="商品类别">
          <el-form-item prop="Category_SerialNumber">
            <el-select v-model.trim="form.Category_SerialNumber" :disabled="true" placeholder="请选择商品类别" filterable
              style="width: 100%">
              <el-option v-for="(item,index) in category" :key="index" :label="item" :value="item"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="商品系列">
          <el-form-item prop="Series_SerialNumber">
            <el-select v-model.trim="form.Series_SerialNumber" :disabled="true" placeholder="请选择商品系列" filterable
              style="width: 100%">
              <el-option v-for="(item,index) in series" :key="index" :label="item" :value="item"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="商品款型">
          <el-form-item prop="Item_SerialNumber">
            <el-select v-model.trim="form.Item_SerialNumber" :disabled="true" placeholder="请选择商品款型" filterable
              style="width: 100%">
              <el-option v-for="(item,index) in item" :key="index" :label="item" :value="item"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="吊牌价">
          <el-form-item prop="Unit_Price">
            <el-input v-model.trim="form.Unit_Price" :disabled="true" placeholder="暂无吊牌价"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="SKU尺寸">
          <el-form-item prop="Size">
            <el-input v-model.trim="form.Size" :disabled="true" placeholder="暂无SKU尺寸"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="SKU重量">
          <el-form-item prop="Weight">
            <el-input v-model.trim="form.Weight" :disabled="true" placeholder="暂无重量"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="SKU单位">
          <el-form-item prop="Weight_Unit">
            <el-select v-model.trim="form.Weight_Unit" :disabled="true" placeholder="请选择SKU单位" filterable
              style="width: 100%">
              <el-option v-for="(item,index) in unit" :key="index" :label="item" :value="item"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="小包装数量">
          <el-form-item prop="Package_Quantity">
            <el-input v-model.trim="form.Package_Quantity" :disabled="true" placeholder="暂无小包装数量"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="SKU包装尺寸">
          <el-form-item prop="SKU_Package_Size">
            <el-input v-model.trim="form.SKU_Package_Size" :disabled="true" placeholder="暂无SKU包装尺寸"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="大包装数量">
          <el-form-item prop="Carton_Quantity">
            <el-input v-model.trim="form.Carton_Quantity" :disabled="true" placeholder="暂无大包装数量"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="商品封面">
          <el-form-item prop="pic">
            <div class="preview">
              <el-image class="el-upload-list__item-thumbnail" style="width: 148px; height: 148px"
                :src="DomainIMG + form.Picture_URL" fit="contain"></el-image>
              <span class="el-upload-list__item-actions">
                <span @click="handlePictureCardPreview(DomainIMG + form.Picture_URL)"><i
                    class="el-icon-zoom-in"></i></span>
              </span>
            </div>
          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>
      <div class="table_titel">
        <div class="titel">商品规格</div>
        <div class="operation">
          <el-button type="primary" size="small" @click="add_article_specifications">新增</el-button>
          <el-button type="danger" size="small" @click="remove_article_specifications">删除</el-button>
        </div>
      </div>
      <el-descriptions :column="3" :rules="rules" border size="small"
        v-for="(item,index) in form.Children.article_specifications" :key="index">
        <el-descriptions-item label="规格说明">
          <el-form-item prop="Specifications_Name">
            <el-input :disabled="item.Picture_URL? true :false" v-model.trim="item.Specifications_Name"
              placeholder="请输入规格说明"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="装箱数">
          <el-form-item prop="Packing">
            <el-input :disabled="  item.Picture_URL? true :false" v-model.trim="item.Packing"
              placeholder="请输入装箱数量"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="装箱尺寸">
          <el-form-item prop="PackingSize">
            <el-input :disabled="  item.Picture_URL? true :false" v-model.trim="item.PackingSize"
              placeholder="请输入装箱尺寸"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="外箱尺寸">
          <el-form-item prop="OutsidePackingSize">
            <el-input :disabled="  item.Picture_URL? true :false" v-model.trim="item.OutsidePackingSize"
              placeholder="请输入外箱尺寸"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="零售价">
          <el-form-item prop="Unit_Price1">
            <el-input :disabled="  item.Picture_URL? true :false" v-model.trim="item.Unit_Price"
              placeholder="请输入零售价"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="净含量">
          <el-form-item prop="Net_Content">
            <el-input :disabled=" item.Picture_URL? true :false" v-model.trim="item.Net_Content"
              placeholder="请输入净含量"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="商品规格封面">
          <el-form-item>
            <div class="preview" v-show="item.Picture_URL">
              <el-image class="el-upload-list__item-thumbnail" style="width: 148px; height: 148px"
                :src="item.pic?item.pic:DomainIMG + item.Picture_URL" fit="contain"></el-image>
              <span class="el-upload-list__item-actions">
                <span @click="handlePictureCardPreview( item.pic?item.pic:DomainIMG + item.Picture_URL)"><i
                    class="el-icon-zoom-in"></i></span>
                <span v-show="item.pic" @click="handleRemove(index)"><i class="el-icon-delete"></i></span>
              </span>
            </div>
            <div @click="handleSpecification(index)">
              <el-upload v-show="!item.Picture_URL" class="upload-demo" :show-file-list="false" list-type="picture-card"
                action="" accept="image/*" :before-upload="Specifications">
                <i slot="default" class="el-icon-plus"></i>
                <div class="el-upload__tip" slot="tip">上传正方形图片，且大小不超过120k</div>
              </el-upload>
            </div>
          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>
      <div class="table_titel">
        <div class="titel">商品主图</div>
        <div class="titel" v-show="form.Children.article_pic.length==0" style="color: red;">暂无上传主图</div>
      </div>
      <el-form-item prop="pic">
        <div class="preview" v-show="item.Picture_Type == 0 " v-for="(item, index) in form.Children.article_pic"
          :key="index">
          <el-image class="el-upload-list__item-thumbnail" style="width: 148px; height: 148px"
            :src="DomainIMG + item.Picture_Url" fit="contain"></el-image>
          <span class="el-upload-list__item-actions">
            <span @click="handlePictureCardPreview(item.pic)"><i class="el-icon-zoom-in"></i></span>
          </span>
        </div>
      </el-form-item>
      <div class="table_titel">
        <div class="titel">商品详情页图片</div>
        <div class="titel" v-show="form.Children.article_pic.length==0" style="color: red;">暂无上传商品详情页图</div>
      </div>
      <el-form-item prop="pic">
        <div class="preview" v-show="item.Picture_Type == 1" v-for="(item, index) in form.Children.article_pic"
          :key="index">
          <el-image class="el-upload-list__item-thumbnail" style="width: 148px; height: 148px"
            :src=" DomainIMG + item.Picture_Url" fit="contain"></el-image>
          <span class="el-upload-list__item-actions">
            <span @click="handlePictureCardPreview(item.pic)"><i class="el-icon-zoom-in"></i></span>
          </span>
        </div>
      </el-form-item>
      <el-form-item class="form-operation">
        <el-button @click="window.history.back()">返回</el-button>
        <el-button type="success" @click="submitForm('formName')" :loading="loading">添加</el-button>
      </el-form-item>
    </el-form>
    <el-dialog :visible.sync="dialogVisible">
      <img width="100%" :src="dialogImageUrl" alt="">
    </el-dialog>
  </div>
  <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
  <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
  <script type="text/javascript" src="../../../js/vue.min.js"></script>
  <script type="text/javascript" src="../../../elementUI/index.js"></script>
  <script type="text/javascript" src="../../../js/utils.js"></script>
  <script type="text/javascript" src="../../../js/ID_Validity.js"></script>
  <script type="text/javascript" src="../../../js/compressor.js"></script>
  <script type="text/javascript" src="../../../js/FileSaver.min.js"></script>
  <script type="text/javascript" src="../../../js/FileSaver.js"></script>
  <script type="text/javascript" src="../../../js/xlsx.full.min.js"></script>
  <script type="text/javascript" src="./js/Edit.js"></script>
</body>

</html>